/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.mes.base.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.NullSerializer;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 材料信息（材料库）实体类
 *
 * @author BladeX
 * @since 2020-09-14
 */
@Data
@TableName("md_material")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "MaterialInfo对象", description = "材料信息（材料库）")
public class MaterialInfo extends BaseEntity {

	private static final long serialVersionUID = 1L;
	@ApiModelProperty(value = "物料编号")
	private String materialNo;
	@ApiModelProperty(value = "物料牌号")
	private String innerDrawingNo;
	@ApiModelProperty(value = "物料名称")
	private String materialName;
	@ApiModelProperty(value = "物料标识")
	private String materialFlag;
	@ApiModelProperty(value = "物料类型")
	private String materialType;
	@ApiModelProperty(value = "物料组编号")
	private String materialGroupNo;
	@ApiModelProperty(value = "规格")
	private String specifications;
	@ApiModelProperty(value = "型号")
	private String model;
	@ApiModelProperty(value = "计量单位")
	private String unit;
	@ApiModelProperty(value = "交付规格")
	private String deliverSpec;
	@ApiModelProperty(value = "材料状态")
	private String productStatus;
	@ApiModelProperty(value = "物料内部编码")
	private String innerCode;
	@ApiModelProperty(value = "价格")
	private String price;
	@ApiModelProperty(value = "单件毛重")
	private Double itemWeight;
	@ApiModelProperty(value = "是否有包装方案1是，2否，默认1")
	@JsonSerialize(
			nullsUsing = NullSerializer.class,
			using = ToStringSerializer.class
	)
	private Integer isPackaging;

	@ApiModelProperty(value = "库区")
	private String warehouseArea;

	@ApiModelProperty(value = "库位")
	private String warehouseLoc;

	@ApiModelProperty("管理方式:1.数量管理,2.条码管理")
	private String managementType;

	@ApiModelProperty(value = "包装标签条码前缀")
	private String labelCodePrefix;

	@ApiModelProperty(value = "条码特征值")
	private String labelCodeEigenvalue;
	@ApiModelProperty("条码特征值1")
	private String labelCodeEigenvalue1;
	@ApiModelProperty("条码特征值2")
	private String labelCodeEigenvalue2;

	@ApiModelProperty(value = "是否高位货架1否，2是 默认1")
	@JsonSerialize(
			nullsUsing = NullSerializer.class,
			using = ToStringSerializer.class
	)
	private Integer isHighShelf;

//	/**
//	 * 选配件/通配件
//	 */
//	@ApiModelProperty("选配件/通配件")
//	private String accessoriesState;

//	/**
//	 * 有效期
//	 */
//	@ApiModelProperty(value = "有效期")
//	@DateTimeFormat(pattern = "yyyy-MM-dd")
//	@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
//	private Date validityPeriod;

	/**
	 * 是否为选配件,0:否,1:是
	 */
	@ApiModelProperty(value = "是否为选配件,0:否,1:是")
	private Integer isOptional;

	/**
	 * 到期日期
	 */
	@ApiModelProperty(value = "到期日期")
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
	private Date expirationDate;

	/**
	 * 所属供应商
	 */
	@ApiModelProperty(value = "所属供应商")
	private String ownerSupplierCode;

	/**
	 * 制造商
	 */
	@ApiModelProperty(value = "制造商")
	private String maker;

	/**
	 * 类别,1:循环使用,2:一次性
	 */
	@ApiModelProperty(value = "类别,1:循环使用,2:一次性")
	private Integer applianceCategory;

	/**
	 * 器具类型名称
	 * utensil_type	-1	器具类型
	 * utensil_type	QJLX01	散件器具
	 * utensil_type	QJLX02	总成器具
	 */
	@ApiModelProperty(value = "器具类型名称")
	private String applianceType;

	@ApiModelProperty(value = "追溯精度:1:批量,2:单件")
	private String tracAccuracy;
	@ApiModelProperty(value = "标箱数量")
	private Integer boxCounts;
	@ApiModelProperty(value = "是否保税件1是，2否")
	@JsonSerialize(
			nullsUsing = NullSerializer.class,
			using = ToStringSerializer.class
	)
	private Integer isBonded;

	@ApiModelProperty(value = "扫码方式")
	private String scanType;
	@ApiModelProperty(value = "特殊类型")
	private String otherType;
}
